home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume6 / glib / part01 next >
Encoding:
Text File  |  1989-05-14  |  55.8 KB  |  1,944 lines

  1. Newsgroups: comp.sources.misc
  2. From: allbery@uunet.UU.NET (Brandon S. Allbery - comp.sources.misc)
  3. Subject: v06i102: glib part 1 of 15
  4. Reply-To: lee@uhccux.uhcc.Hawaii.Edu (Greg Lee )
  5.  
  6. Posting-number: Volume 6, Issue 102
  7. Submitted-by: lee@uhccux.uhcc.Hawaii.Edu (Greg Lee )
  8. Archive-name: glib/part01
  9.  
  10.  
  11. This is an alpha distribution (v. 1.6) of glib, an editor and librarian for
  12. synthesizer patches by Tim Thompson with modifications by Steve Falco,
  13. Michael Kesti, Alan Bland, Greg Lee, Scott Snyder, and Mark Rinfret.
  14.  
  15. There are 15 shar files.
  16.  
  17.         Greg Lee, lee@uhccux.uhcc.hawaii.edu, May 7, 1989
  18.  
  19. #! /bin/sh
  20. # This is a shell archive.  Remove anything before this line, then unpack
  21. # it by saving it into a file and typing "sh file".  To overwrite existing
  22. # files, type "sh file -c".  You can also feed this as standard input via
  23. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  24. # will see the following message at the end:
  25. #        "End of archive 1 (of 15)."
  26. # Contents:  AmiAztec-make MANIFEST Makefile README README.arp
  27. #   ReadMe.CZ1 amigadir.c amigadir.h amigmach.h amigmake dx100.mnu
  28. #   glib.h k1vis.h k5multi.mnu mac-glib.r mac-mach.h mac-make.uu
  29. #   mac-mdr.h mac-vt.h makevish.l patchlevel.h pc-readme pc-tcc.mak
  30. #   st-mach.h unix-mach.h vis.h
  31. # Wrapped by lee@uhccux on Sun May  7 00:40:07 1989
  32. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  33. if test -f 'AmiAztec-make' -a "${1}" != "-c" ; then 
  34.   echo shar: Will not clobber existing file \"'AmiAztec-make'\"
  35. else
  36. echo shar: Extracting \"'AmiAztec-make'\" \(1153 characters\)
  37. sed "s/^X//" >'AmiAztec-make' <<'END_OF_FILE'
  38. X# $Id: AmiAztec-make,v 1.6 89/05/06 17:13:04 lee Exp $
  39. X# Mark Rinfret
  40. X# $Log:    AmiAztec-make,v $
  41. X# Revision 1.6  89/05/06  17:13:04  lee
  42. X# rel. to comp.sources.misc
  43. X# 
  44. X#
  45. X# this makefile is for the AMIGA using Aztec C
  46. X#
  47. X
  48. X#Define the following flag if you want statistics gathering:
  49. X#STATS = -DSTATISTICS
  50. XSTATS =
  51. XSYNTHS = -DCZ1
  52. XCFLAGS = -B +L $(SYNTHS) -E200 -n $(STATS)
  53. XCC = cc
  54. X
  55. X# OBJ = machdep.o glib.o list.o dx100.o tx81z.o tx81p.o dw8000.o yama_com.o\
  56. X#       k5.o cz1.o amigadir.o
  57. X
  58. X# CZ1-only build (be sure to change list.c #defines):
  59. XOBJ = machdep.o glib.o list.o cz1.o amigadir.o
  60. X
  61. X# OBJ = machdep.o glib.o list.o k5.o
  62. X
  63. Xglib : menutoc $(OBJ)
  64. X        ln -w -g -o glib $(OBJ) -lc32
  65. X
  66. Xmachdep.h: amigmach.h
  67. X    copy amigmach.h machdep.h
  68. X
  69. Xmachdep.o: machdep.c machdep.h
  70. X
  71. Xmachdep.c: amigmach.c
  72. X    copy amigmach.c machdep.c
  73. X
  74. X# This doesn't appear to work for Aztec's make. ?
  75. X# .mnu.c:
  76. X#        @rm -f $@
  77. X#        menutoc <$*.mnu >$@
  78. X
  79. Xmenutoc:  menutoc.o
  80. X        ln -w -g -o menutoc menutoc.o -lc32
  81. X
  82. Xmenutoc.c: menutoc.l
  83. X        flex menutoc.l
  84. X        copy clone lex.yy.c menutoc.c
  85. X
  86. Xcz1.c: cz1.mnu menutoc
  87. X       menutoc <cz1.mnu >cz1.c
  88. X
  89. Xcz1.o: cz1.c
  90. X
  91. X
  92. X
  93. X
  94. END_OF_FILE
  95. if test 1153 -ne `wc -c <'AmiAztec-make'`; then
  96.     echo shar: \"'AmiAztec-make'\" unpacked with wrong size!
  97. fi
  98. # end of 'AmiAztec-make'
  99. fi
  100. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  101.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  102. else
  103. echo shar: Extracting \"'MANIFEST'\" \(3707 characters\)
  104. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  105. X   File Name        Archive #    Description
  106. X-----------------------------------------------------------
  107. X AmiAztec-make              1    
  108. X CHANGES                    2    note recent modifications
  109. X DX-README                  2    notes on DX7 version
  110. X MANIFEST                   1    This shipping list
  111. X Makefile                   1    for Ultrix
  112. X PORTING                    6    how to implement a version for a new synth
  113. X README                     1    
  114. X README.arp                 1    doc on Dave Weiler's arp modification
  115. X ReadMe.CZ1                 1    
  116. X amigadir.c                 1    Unix-like dir access for Amiga
  117. X amigadir.h                 1    Unix-like dir access for Amiga
  118. X amigmach.c                 7    
  119. X amigmach.h                 1    
  120. X amigmake                   1    
  121. X ctomenu.l                  2    (f)lex program partially translates old C
  122. X cz.h                       2    CZ1/CZ101 support
  123. X cz1.mnu                   12    CZ1/CZ101 support
  124. X d10pat.mnu                 4    Roland D10 "synth" module
  125. X d10rsu.mnu                 3    Roland D10 "synth" module
  126. X d10tim.mnu                 4    Roland D10 "synth" module
  127. X d10ton.c                   3    misc. Roland ton routines
  128. X d10tra.mnu                 5    Roland D10 "synth" module
  129. X d10tva.mnu                 2    Roland D10 "synth" module
  130. X d10tvf.mnu                 2    Roland D10 "synth" module
  131. X d10urp.mnu                 7    Roland D10 "synth" module
  132. X d10wfg.mnu                 2    Roland D10 "synth" module
  133. X dep5.mnu                   8    DEP5 synth module
  134. X dw8000.mnu                 5    Yamaha synth module
  135. X dx100.mnu                  1    Yamaha synth module
  136. X dx7.mnu                    9    DX7 synth module
  137. X dx7s.mnu                  10    DX7s synth module (requires dx7.mnu)
  138. X glib.1                     3    man page
  139. X glib.c                    15    the editor
  140. X glib.h                     1    shared data between editor and synth modules
  141. X glib.man                   4    preformatted man page
  142. X glibinit.dp5               4    required for DEP5
  143. X k1multi.mnu                6    K1 "synth" module for multi patches
  144. X k1single.mnu               2    K1 "synth" module for single patches
  145. X k1vis.c                    3    K1 display routines for patch edit screens
  146. X k1vis.h                    1    include for k1vis.c (made: make k1vis.h)
  147. X k5multi.mnu                1    K5 "synth" module for multi patches
  148. X k5single.mnu               5    K5 "synth" module for multi patches
  149. X list.c                     4    tells editor which synth modules to use
  150. X mac-glib.r                 1    
  151. X mac-mach.c                 3    
  152. X mac-mach.h                 1    
  153. X mac-make.uu                1    
  154. X mac-mdr.a                  8    
  155. X mac-mdr.h                  1    
  156. X mac-vt.c                   9    
  157. X mac-vt.h                   1    
  158. X makevish.l                 1    (f)lex program makes (k1)vis.h (from (k1)vis.c)
  159. X menutoc.c                 11    constructed from menutoc.l with flex
  160. X menutoc.l                  7    (f)lex program translates .menu files to C
  161. X patchlevel.h               1    record number of patches applied
  162. X pc-ints.asm                6    
  163. X pc-mach.c                  6    ibmpc
  164. X pc-mach.h                  2    ibmpc
  165. X pc-readme                  1    
  166. X pc-tcc.mak                 1    makefile for Turbo C
  167. X smp1.arc.uu               14    sample patch files
  168. X smp2.arc.uu               13    sample patch files
  169. X st-mach.c                  2    atari st
  170. X st-mach.h                  1    atari st
  171. X tx81p.mnu                  8    Yamaha synth module
  172. X tx81z.mnu                  3    Yamaha synth module
  173. X unix-mach.c                3    Unix routines (midi io routines stubbed)
  174. X unix-mach.h                1    Unix defines
  175. X vis.c                      5    D10 display routines for patch edit screens
  176. X vis.h                      1    include for vis.c (made: make vis.h)
  177. X yama_com.c                10    misc. Yamaha routines
  178. END_OF_FILE
  179. if test 3707 -ne `wc -c <'MANIFEST'`; then
  180.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  181. fi
  182. # end of 'MANIFEST'
  183. fi
  184. if test -f 'Makefile' -a "${1}" != "-c" ; then 
  185.   echo shar: Will not clobber existing file \"'Makefile'\"
  186. else
  187. echo shar: Extracting \"'Makefile'\" \(3731 characters\)
  188. sed "s/^X//" >'Makefile' <<'END_OF_FILE'
  189. X# $Id: Makefile,v 1.6 89/05/06 17:13:07 lee Exp $
  190. X# Glib, Unix version for Kawai K1, etc.
  191. X# Greg Lee, lee@uhccux.uhcc.hawaii.edu
  192. X# Feb, 1989
  193. X# adapted from Tim Thompson's program and Michael Kesti's version
  194. X# $Log:    Makefile,v $
  195. X# Revision 1.6  89/05/06  17:13:07  lee
  196. X# rel. to comp.sources.misc
  197. X# 
  198. X# 
  199. X
  200. XLEX = flex
  201. XLEXLIB =
  202. X# to use lex instead of flex:
  203. X#LEX = lex
  204. X#LEXLIB = -ll
  205. X
  206. X# defines for CFLAGS (below):
  207. X#    BSD for fopen with mode 'r'/'w' instead of 'rb'/'wb'
  208. X#    ULTRIX enables curses no()/nonl() fix
  209. X#    ARROW for use of arrow keys
  210. X#    SSS to enable speed-up code in glib.c
  211. X#
  212. X# and uncomment one set of the following for supported synths:
  213. X
  214. X# Remove '#' from next 5 lines for Roland D-10:
  215. X#SYNTHS = -DROLANDD10
  216. X#SYNTHOBJ = vis.o d10pat.o d10tim.o d10ton.o d10wfg.o d10tvf.o d10tva.o \
  217. X#    d10rsu.o d10urp.o d10tra.o
  218. X#SYNTHC = d10pat.c d10tim.c d10wfg.c d10tvf.c d10tva.c \
  219. X#    d10rsu.c d10urp.c d10tra.c # vis.h
  220. X
  221. X# Remove '#' from next 4 lines for various Yamaha, K5, etc.:
  222. X#SYNTHS = -DTX81Z -DTX81ZPERF -DDX100 -DDW8000 -DKAWAIK5 -DDEP5
  223. X#SYNTHOBJ = dx100.o tx81z.o tx81p.o dw8000.o yama_com.o \
  224. X#    k5single.o k5multi.o dep5.o
  225. X#SYNTHC = dx100.c tx81z.c tx81p.c dw8000.c k5single.c k5multi.c dep5.c
  226. X
  227. X# Remove '#' from next 3 lines for DX7:
  228. X#SYNTHS = -DDX7 -DDX7S
  229. X#SYNTHOBJ = dx7.o dx7s.o
  230. X#SYNTHC = dx7.c dx7s.c
  231. X
  232. X# Remove '#' from next 3 lines for Kawai K1:
  233. X#SYNTHS = -DKAWAIK1
  234. X#SYNTHOBJ = k1vis.o k1multi.o k1single.o
  235. X#SYNTHC = k1multi.c k1single.c # k1vis.h
  236. X
  237. X# Remove '#' from next 3 lines for CZ1:
  238. X#SYNTHS = -DCZ1
  239. X#SYNTHOBJ = cz1.o
  240. X#SYNTHC = cz1.c
  241. X
  242. XDEFNS = -DBSD -DULTRIX -DARROW -DSSS $(SYNTHS)
  243. XCFLAGS = -O $(DEFNS)
  244. X
  245. XOBJ = machdep.o glib.o list.o $(SYNTHOBJ)
  246. X
  247. XLIBS = -lcurses -ltermcap -lm
  248. X
  249. X.SUFFIXES: .mnu
  250. X
  251. Xglib : menutoc $(SYNTHC) $(OBJ)
  252. X    $(CC) -s $(OBJ) $(LIBS) -o glib
  253. X    @echo "Make complete."
  254. X
  255. Xlint: $(SYNTHC)
  256. X    @rm -f lintlog
  257. X    lint -phbv -Dlint $(DEFNS) glib.c list.c $(SYNTHC) \
  258. X        machdep.c $(LIBS)  >lintlog
  259. X# add yama_com.c above to lint dx100, etc. version
  260. X
  261. Xmachdep.c: unix-mach.c machdep.h
  262. X    rm -f machdep.c
  263. X    ln -s unix-mach.c machdep.c
  264. X
  265. Xmachdep.h: unix-mach.h
  266. X    rm -f machdep.h
  267. X    ln -s unix-mach.h machdep.h
  268. X
  269. Xmachdep.o : machdep.c glib.h /usr/include/ctype.h \
  270. X    /usr/include/curses.h /usr/include/sys/termio.h
  271. X# On the UNIX PC (at least mine), cbreak() and nocbreak() aren't in
  272. X# libcurses.a so this hack (-DFAKECBREAK) is one way out.
  273. X# On the UNIX PC, add a -DFAKECBREAK to the following line
  274. X#    cc $(CFLAGS) -c machdep.c -DFAKECBREAK
  275. X    $(CC) $(CFLAGS) -c machdep.c
  276. X
  277. X.mnu.c:
  278. X    @rm -f $@
  279. X    menutoc $*.mnu >$@
  280. X
  281. Xmenutoc:  menutoc.c
  282. X    $(CC) -s -o menutoc menutoc.c $(LEXLIB)
  283. X
  284. Xmenutoc.c: menutoc.l
  285. X    touch menutoc.c
  286. X# to revise menutoc, substitute for above:
  287. X#menutoc.c: menutoc.l
  288. X#    $(LEX) menutoc.l
  289. X#    mv lex.yy.c menutoc.c
  290. X
  291. X# to automate construction of k1vis.h:
  292. X#k1vis.h: k1vis.c makevish
  293. X#    rm -f k1vis.h
  294. X#    makevish <k1vis.c >k1vis.h
  295. X
  296. X# to automate construction of vis.h:
  297. X#vis.h:    vis.c makevish
  298. X#    rm -f vis.h
  299. X#    makevish <vis.c >vis.h
  300. X
  301. Xmakevish: makevish.l
  302. X    $(LEX) makevish.l
  303. X    $(CC) -o makevish lex.yy.c $(LEXLIB)
  304. X
  305. Xctomenu: ctomenu.l
  306. X    $(LEX) ctomenu.l
  307. X    $(CC) -o ctomenu lex.yy.c $(LEXLIB)
  308. X
  309. Xclean:
  310. X    rm -f *.o lex.yy.c $(SYNTHC) makevish \
  311. X        machdep.c machdep.h menutoc core MANIFEST.BAK *.hdr
  312. X
  313. Xshar:
  314. X    rm -f glib.shar.*
  315. X    makekit -m -nglib.shar.
  316. X
  317. Xglib.o:        glib.h
  318. Xlist.o:        glib.h
  319. Xmachdep.o:    glib.h
  320. Xyama_com.o:    glib.h
  321. Xcz1.o:        glib.h cz.h
  322. Xd10pat.o:    glib.h vis.h
  323. Xd10rsu.o:    glib.h vis.h
  324. Xd10tim.o:    glib.h vis.h
  325. Xd10ton.o:    glib.h
  326. Xd10tra.o:    glib.h vis.h
  327. Xd10tva.o:    glib.h vis.h
  328. Xd10tvf.o:    glib.h vis.h
  329. Xd10urp.o:    glib.h vis.h
  330. Xd10wfg.o:    glib.h vis.h
  331. Xdep5.o:        glib.h
  332. Xdw8000.o:    glib.h
  333. Xdx100.o:    glib.h
  334. Xdx7.o:        glib.h
  335. Xdx7s.o:        glib.h
  336. Xk1multi.o:    glib.h k1vis.h
  337. Xk1single.o:    glib.h k1vis.h
  338. Xk5multi.o:    glib.h
  339. Xk5single.o:    glib.h
  340. Xtx81p.o:    glib.h
  341. Xtx81z.o:    glib.h
  342. END_OF_FILE
  343. if test 3731 -ne `wc -c <'Makefile'`; then
  344.     echo shar: \"'Makefile'\" unpacked with wrong size!
  345. fi
  346. # end of 'Makefile'
  347. fi
  348. if test -f 'README' -a "${1}" != "-c" ; then 
  349.   echo shar: Will not clobber existing file \"'README'\"
  350. else
  351. echo shar: Extracting \"'README'\" \(2050 characters\)
  352. sed "s/^X//" >'README' <<'END_OF_FILE'
  353. X
  354. XThis is an alpha distribution of glib, an editor and librarian for
  355. Xsynthesizer patches by Tim Thompson with modifications by Steve Falco,
  356. XMichael Kesti, Alan Bland, Greg Lee, Scott Snyder, and Mark Rinfret.
  357. XSome of the code was originally written by Steve Frysinger (moss!spf),
  358. XJohn Helton, and James Gosling.  (I may have misattributed authorship
  359. Xof some files -- please tell me.)
  360. X
  361. XSample patch files are arc'd and uuencoded in the file samples.arc.uu.
  362. X
  363. XIt compiles and the editing and file parts work (seemingly) under Unix
  364. X(Ultrix).  Midi communications with a synth are not implemented,
  365. Xhowever.  Previous versions, including midi communication, have
  366. Xapparently worked for Ibmpc's, Atari st, Apple Macintosh, and Amiga.
  367. XThe source for these pc's is included, but I don't know whether it works
  368. Xwith this version.  At the very least, in most cases the makefiles will
  369. Xhave to be updated.  The most recently worked on pc versions are the
  370. Xones for Amiga-CZ1 and TurboC-Dx7, so they are the most likely to work
  371. Xas is.
  372. X
  373. XThe U and D commands (dump/undump midi commands to file) are implemented
  374. Xonly for the Unix version.  The relevant code in unix-mach.c would
  375. Xhave to be merged into the various ...mach.c files.
  376. X
  377. XTo compile the Unix BSD Ultrix version, first uncomment some lines in
  378. Xthe Makefile (as noted there), depending on which synths you want glib
  379. Xto handle, then type 'make'.  For other varieties of Unix, remove
  380. X'-DULTRIX' or '-DBSD' from CFLAGS in the Makefile, and hope for the
  381. Xbest.  This will probably work for the ATT 3b1.  For the various little
  382. Xpc's, consult the information in the PORTING document, in ReadMe.CZ1,
  383. Xand in DX-README (for the Dx7).  NB:  For the TURBO-C plus DX7
  384. Xversion, one must uncomment #pragma directives in two places in file
  385. Xdx7.mnu.
  386. X
  387. XFor instructions for use, see glib.man (troff source in glib.1).
  388. XFor porting to new synths, see PORTING.
  389. X
  390. XFixes, code for other pc's or synthesizers, suggestions, complaints
  391. Xcan be sent to me or posted, as you think best.
  392. X
  393. X        Greg Lee, lee@uhccux.uhcc.hawaii.edu, April 28, 1989
  394. END_OF_FILE
  395. if test 2050 -ne `wc -c <'README'`; then
  396.     echo shar: \"'README'\" unpacked with wrong size!
  397. fi
  398. # end of 'README'
  399. fi
  400. if test -f 'README.arp' -a "${1}" != "-c" ; then 
  401.   echo shar: Will not clobber existing file \"'README.arp'\"
  402. else
  403. echo shar: Extracting \"'README.arp'\" \(1469 characters\)
  404. sed "s/^X//" >'README.arp' <<'END_OF_FILE'
  405. XADDITION OF ARP FILE REQUESTER TO GLIB
  406. X
  407. XThe file machdep.c (Amiga version) has been modified to use the ARP
  408. Xfile requester if the symbol ARP is defined.
  409. X
  410. Xe.g. to compile machdep.c using Lattice 5.02 use:
  411. X    lc -cw -dARP machdep
  412. X
  413. XThe boolean variable FileRequestImminent is set to TRUE if the subroutine
  414. Xwindstr(s) is called with the first 9 characters of the string "s" equal
  415. Xto "File name"; i.e., it looks for the "File name --> " prompt.
  416. X
  417. XIf FileRequestImminent is TRUE when the subroutine windgets(s), is called,
  418. Xthen the ARP file requester is invoked and the resultant file name is
  419. Xreturned in the string s.  FileRequestImminent is set to FALSE so that
  420. Xsubsequent calls to windgets(s) do not invoke the ARP file requester,
  421. Xunless preceeded by another file name prompt.
  422. X
  423. XThe above works only if "glib.c" sticks more or less to the following
  424. Xmethod of getting the file name:
  425. X    message("File name --> ");
  426. X    windgets(fname);
  427. X
  428. XWhen linking, if ARP is defined, it is necessary to use the ARP startup
  429. Xcode "arpc.o" instead of the usual "c.o", and to include LIB:arp.lib,
  430. Xe.g.:
  431. X
  432. XFROM LIB:arpc.o+glib.o+d10pat.o+ etc.
  433. XTO glib
  434. XLIB LIB:arp.lib LIB:lc.lib LIB:amiga.lib
  435. X
  436. XIf the program is compiled to use the ARP file requester, and is then
  437. Xrun on a system which does not have "arp.library" in libs:, then it
  438. Xwill gracefully exit with an error message (as with other ARP programs).
  439. X
  440. X    Dave Weiler
  441. X    #513, 918-16 Ave NW
  442. X    CALGARY, Alberta
  443. X    Canada T2M 0K3
  444. X    (403) 295-3084
  445. X    bix: dweiler
  446. END_OF_FILE
  447. if test 1469 -ne `wc -c <'README.arp'`; then
  448.     echo shar: \"'README.arp'\" unpacked with wrong size!
  449. fi
  450. # end of 'README.arp'
  451. fi
  452. if test -f 'ReadMe.CZ1' -a "${1}" != "-c" ; then 
  453.   echo shar: Will not clobber existing file \"'ReadMe.CZ1'\"
  454. else
  455. echo shar: Extracting \"'ReadMe.CZ1'\" \(2671 characters\)
  456. sed "s/^X//" >'ReadMe.CZ1' <<'END_OF_FILE'
  457. X
  458. XAbout the CZ1 segment of GLIB:
  459. X------------------------------
  460. XMark Rinfret, 04/24/89
  461. X
  462. X
  463. XI am releasing this to the public, even though it is not finished.  I've
  464. Xdone the really hard grunt work.  Some polishing is definitely in order.
  465. X
  466. XI developed this on an Amiga 1000 using Aztec C, 3.6b. Alan Bland gets
  467. Xthe credit for the Amiga support routines.  I added in some portable
  468. Xdirectory routines that I obtained from Usenet and a couple of mods
  469. Xto amiga-mach.c and glib proper.
  470. X
  471. XThe CZ1 is a nice synth, but its MIDI encodings are a nightmare.  I
  472. Xhaven't done so much bit-diddling since I worked on military
  473. Xsystems as a civil servant! If you see code in cz1.c that appears to do
  474. Xreally strange things, that's because it does really strange things.
  475. XOne of the problems I encountered was with the Aztec compiler and
  476. Xalignment of the patch data structure.  I would like to have used a better
  477. Xdefinition of the patch structure, but the compiler insisted on inserting
  478. Xextra alignment bytes in my preferred representation.
  479. X
  480. XI've experienced timeouts when downloading bulk patch data from the
  481. Xsynth. The download sequence might get as high as say, voice 33, and
  482. Xthen time out on me.  I might have to retry a couple of times, but I
  483. Xalways eventually complete the sequence. This may be a problem isolated
  484. Xto my particular setup, but if you experience similar problems, please
  485. Xlet me know.
  486. X
  487. XYou'll notice a couple of "#ifdef undef" statements in the cz1.c module.
  488. XI was going to include settings for Glide, Portamento, etc., and then
  489. Xrealized that these are really "operational" parameters rather than
  490. Xinformation that's kept with the patch data.  There really should be
  491. Xanother segment for controlling the thousand other features of the CZ1.
  492. XI was primarily interested in using GLIB for creating/managing patches.
  493. X[These settings are now included in the menu (there is no file cz1.c
  494. Xanymore), but are not stored in the patch file.  -- gl]
  495. X
  496. XIf you peruse the source, you will find some references to the CZ-101
  497. Xin the cz.h header file.  That's a throwback to an earlier age. If
  498. Xsomeone decides to implement a CZ-101 segment, he/she should not
  499. Xtake any of the CZ-101 stuff for granted. Though the CZ-1 and CZ-101
  500. Xare of the same family, I used sysex messages not available to the
  501. XCZ-101.
  502. X
  503. XThat about wraps it.  If you have any comments/questions/suggestions/changes,
  504. Xplease get in touch with me.  You can reach me at one of the following:
  505. X
  506. X    Mark R. Rinfret
  507. X    work - 401-849-9390 (0700-1700)
  508. X    home - 401-846-7639 (1900-2200)
  509. X    Usenet - mrr@amanpt1.Newport.RI.US
  510. X             ...!rayssd!galaxia!amanpt1!mrr
  511. X
  512. X    BIX - markr (I seldom go there)
  513. X    CIS - 72017, 136 (ditto)
  514. X
  515. X
  516. END_OF_FILE
  517. if test 2671 -ne `wc -c <'ReadMe.CZ1'`; then
  518.     echo shar: \"'ReadMe.CZ1'\" unpacked with wrong size!
  519. fi
  520. # end of 'ReadMe.CZ1'
  521. fi
  522. if test -f 'amigadir.c' -a "${1}" != "-c" ; then 
  523.   echo shar: Will not clobber existing file \"'amigadir.c'\"
  524. else
  525. echo shar: Extracting \"'amigadir.c'\" \(2519 characters\)
  526. sed "s/^X//" >'amigadir.c' <<'END_OF_FILE'
  527. X/* $Id: amigadir.c,v 1.6 89/05/06 17:13:09 lee Exp $
  528. X *
  529. X * ndir - routines to simulate the 4BSD new directory code for AmigaDOS.
  530. X */
  531. X#include "dir.h"
  532. X
  533. XDIR *
  534. Xopendir(dirname) 
  535. X    char *dirname; 
  536. X{
  537. X    register DIR *my_dir, *AllocMem() ;
  538. X    struct FileLock    *Lock(), *CurrentDir() ;
  539. X
  540. X    if ((my_dir = AllocMem((long) sizeof(DIR), 0L)) == NULL) return NULL ;
  541. X
  542. X
  543. X    if (((my_dir -> d_lock = Lock(dirname, ACCESS_READ)) == NULL)
  544. X    /* If we can't examine it */
  545. X    ||  !Examine(my_dir -> d_lock, &(my_dir -> d_info))
  546. X    /* Or it's not a directory */
  547. X    ||  (my_dir -> d_info . fib_DirEntryType < 0)) {
  548. X        FreeMem(my_dir, (long) sizeof(DIR)) ;
  549. X        return NULL ;
  550. X        }
  551. X    return my_dir ;
  552. X    }
  553. X
  554. Xstruct direct *
  555. Xreaddir(my_dir) DIR *my_dir; {
  556. X    static struct direct    result ;
  557. X
  558. X    if (!ExNext(my_dir -> d_lock, &(my_dir -> d_info))) return NULL ;
  559. X
  560. X    result.d_reclen = result.d_ino = 1 ;    /* Not NULL! */
  561. X    (void) strcpy(result.d_name, my_dir -> d_info.fib_FileName) ;
  562. X    result.d_namlen = strlen(result.d_name) ;
  563. X    return &result ;
  564. X    }
  565. X
  566. Xvoid
  567. Xclosedir(my_dir) DIR *my_dir; {
  568. X
  569. X    UnLock(my_dir -> d_lock) ;
  570. X    FreeMem(my_dir, (long) sizeof(DIR)) ;
  571. X    }
  572. X/*
  573. X * telldir and seekdir don't work quite right. The problem is that you have
  574. X * to save more than a long's worth of stuff to indicate position, and it's
  575. X * socially unacceptable to alloc stuff that you don't free later under
  576. X * AmigaDOS. So we fake it - you get one level of seek, and dat's all.
  577. X * As of now, these things are untested.
  578. X */
  579. X#define DIR_SEEK_RETURN        ((long) 1)    /* Not 0! */
  580. Xlong
  581. Xtelldir(my_dir) 
  582. X    DIR *my_dir;
  583. X{
  584. X    my_dir -> d_seek = my_dir -> d_info ;
  585. X    return (long) DIR_SEEK_RETURN ;
  586. X}
  587. X
  588. Xvoid
  589. Xseekdir(my_dir, where) 
  590. X    DIR *my_dir; long where; 
  591. X{
  592. X    if (where == DIR_SEEK_RETURN)
  593. X        my_dir -> d_info = my_dir -> d_seek ;
  594. X    else    /* Makes the next readdir fail */
  595. X        setmem((char *) my_dir, sizeof(DIR), 0) ;
  596. X}
  597. X
  598. Xvoid
  599. Xrewinddir(my_dir) 
  600. X    DIR *my_dir; 
  601. X{
  602. X
  603. X    if (!Examine(my_dir -> d_lock, &(my_dir -> d_info)))
  604. X        setmem((char *) my_dir, sizeof(DIR), 0) ;
  605. X}
  606. X#ifdef    TEST
  607. X/*
  608. X * Simple code to list the files in the argument directory,
  609. X *    lifted straight from the man page.
  610. X */
  611. X#include <stdio.h>
  612. Xvoid
  613. Xmain(argc, argv) int argc; char **argv; {
  614. X    register DIR        *dirp ;
  615. X    register struct direct    *dp ;
  616. X    register char        *name ;
  617. X
  618. X    if (argc < 2) name = "" ;
  619. X    else name = argv[1] ;
  620. X
  621. X    if ((dirp = opendir(name)) == NULL) {
  622. X        fprintf(stderr, "Bogus! Can't opendir %s\n", name) ;
  623. X        exit(1) ;
  624. X        }
  625. X
  626. X    for (dp = readdir(dirp); dp != NULL; dp = readdir(dirp))
  627. X        printf("%s ", dp -> d_name) ;
  628. X    closedir(dirp);
  629. X    putchar('\n') ;
  630. X    }
  631. X#endif    TEST
  632. X
  633. END_OF_FILE
  634. if test 2519 -ne `wc -c <'amigadir.c'`; then
  635.     echo shar: \"'amigadir.c'\" unpacked with wrong size!
  636. fi
  637. # end of 'amigadir.c'
  638. fi
  639. if test -f 'amigadir.h' -a "${1}" != "-c" ; then 
  640.   echo shar: Will not clobber existing file \"'amigadir.h'\"
  641. else
  642. echo shar: Extracting \"'amigadir.h'\" \(1801 characters\)
  643. sed "s/^X//" >'amigadir.h' <<'END_OF_FILE'
  644. X/* $Id: amigadir.h,v 1.6 89/05/06 17:13:10 lee Exp $
  645. X */
  646. X#ifndef DIR_H
  647. X#define DIR_H
  648. X
  649. X#ifndef    EXEC_TYPES_H
  650. X#include "exec/types.h"
  651. X#endif
  652. X
  653. X#ifndef    LIBRARIES_DOS_H
  654. X#include "libraries/dos.h"
  655. X#endif
  656. X
  657. X#ifndef    LIBRARIES_DOSEXTENS_H
  658. X#include "libraries/dosextens.h"
  659. X#endif
  660. X/*
  661. X * MAXNAMELEN is the maximum length a file name can be. The direct structure
  662. X * is lifted form 4BSD, and has not been changed so that code which uses
  663. X * it will be compatable with 4BSD code. d_ino and d_reclen are unused,
  664. X * and will probably be set to some non-zero value.
  665. X */
  666. X#define    MAXNAMLEN    31        /* AmigaDOS file max length */
  667. X
  668. Xstruct    direct {
  669. X    ULONG    d_ino ;            /* unused - there for compatability */
  670. X    USHORT    d_reclen ;        /* ditto */
  671. X    USHORT    d_namlen ;        /* length of string in d_name */
  672. X    char    d_name[MAXNAMLEN + 1] ;    /* name must be no longer than this */
  673. X};
  674. X/*
  675. X * The DIRSIZ macro gives the minimum record length which will hold
  676. X * the directory entry.  This requires the amount of space in struct direct
  677. X * without the d_name field, plus enough space for the name with a terminating
  678. X * null byte (dp->d_namlen+1), rounded up to a 4 byte boundary.
  679. X */
  680. X
  681. X#undef DIRSIZ
  682. X#define DIRSIZ(dp) \
  683. X    ((sizeof(struct direct) - (MAXNAMLEN+1)) + (((dp) -> d_namlen+1 + 3) &~ 3))
  684. X/*
  685. X * The DIR structure holds the things that AmigaDOS needs to know about
  686. X * a file to keep track of where it is and what it's doing.
  687. X */
  688. X
  689. Xtypedef struct {
  690. X    struct FileInfoBlock    d_info ,    /* Default info block */
  691. X                d_seek ;    /* Info block for seeks */
  692. X    struct FileLock        *d_lock ;    /* Lock on directory */
  693. X    } DIR ;
  694. X    
  695. Xextern    DIR *opendir(/* char * */); 
  696. Xextern    struct direct *readdir(/* DIR * */) ;
  697. Xextern    long telldir(/* DIR * */) ;
  698. Xextern    void seekdir(/* DIR *, long */) ;
  699. Xextern    void rewinddir(/* DIR * */) ;
  700. Xextern    void closedir(/* DIR * */) ;
  701. X#endif    DIR_H
  702. END_OF_FILE
  703. if test 1801 -ne `wc -c <'amigadir.h'`; then
  704.     echo shar: \"'amigadir.h'\" unpacked with wrong size!
  705. fi
  706. # end of 'amigadir.h'
  707. fi
  708. if test -f 'amigmach.h' -a "${1}" != "-c" ; then 
  709.   echo shar: Will not clobber existing file \"'amigmach.h'\"
  710. else
  711. echo shar: Extracting \"'amigmach.h'\" \(358 characters\)
  712. sed "s/^X//" >'amigmach.h' <<'END_OF_FILE'
  713. X/* $Id: amigmach.h,v 1.6 89/05/06 17:13:11 lee Exp $
  714. X *
  715. X * GLIB - a Generic LIBrarian and editor for synths
  716. X *
  717. X * Machine dependent stuff.
  718. X *
  719. X * Amiga version
  720. X * Alan Bland
  721. X * $Log:    amigmach.h,v $
  722. X * Revision 1.6  89/05/06  17:13:11  lee
  723. X * rel. to comp.sources.misc
  724. X * 
  725. X */
  726. X
  727. X#include <string.h>
  728. X
  729. X#define INT16 int
  730. X
  731. X#define STATMIDI    statmidi()
  732. X#define AMIGA
  733. END_OF_FILE
  734. if test 358 -ne `wc -c <'amigmach.h'`; then
  735.     echo shar: \"'amigmach.h'\" unpacked with wrong size!
  736. fi
  737. # end of 'amigmach.h'
  738. fi
  739. if test -f 'amigmake' -a "${1}" != "-c" ; then 
  740.   echo shar: Will not clobber existing file \"'amigmake'\"
  741. else
  742. echo shar: Extracting \"'amigmake'\" \(477 characters\)
  743. sed "s/^X//" >'amigmake' <<'END_OF_FILE'
  744. X# $Id: amigmake,v 1.6 89/05/06 17:13:11 lee Exp $
  745. X# Alan Bland
  746. X# $Log:    amigmake,v $
  747. X# Revision 1.6  89/05/06  17:13:11  lee
  748. X# rel. to comp.sources.misc
  749. X# 
  750. X# 
  751. X# this makefile is for the AMIGA using the LMK utility and Lattice 5.02
  752. X#
  753. X
  754. XOBJ = machdep.o glib.o list.o dx100.o tx81z.o tx81p.o dw8000.o yama_com.o k5.o
  755. X# OBJ = machdep.o glib.o list.o k5.o
  756. X
  757. X.c.o :
  758. X    lc:lc -cw -cs -v $*
  759. X
  760. Xglib : $(OBJ)
  761. X    lc:blink from lib:c.o $(OBJ) lib lib:lc.lib lib:amiga.lib \
  762. X    batch nodebug to glib
  763. END_OF_FILE
  764. if test 477 -ne `wc -c <'amigmake'`; then
  765.     echo shar: \"'amigmake'\" unpacked with wrong size!
  766. fi
  767. # end of 'amigmake'
  768. fi
  769. if test -f 'dx100.mnu' -a "${1}" != "-c" ; then 
  770.   echo shar: Will not clobber existing file \"'dx100.mnu'\"
  771. else
  772. echo shar: Extracting \"'dx100.mnu'\" \(4111 characters\)
  773. sed "s/^X//" >'dx100.mnu' <<'END_OF_FILE'
  774. X/* $Id: dx100.mnu,v 1.6 89/05/06 17:13:22 lee Exp $
  775. X * GLIB - a Generic LIBrarian and editor for synths
  776. X *
  777. X * DX-100 routines
  778. X * Tim Thompson
  779. X * modifications: Greg Lee
  780. X * $Log:    dx100.mnu,v $
  781. X * Revision 1.6  89/05/06  17:13:22  lee
  782. X * rel. to comp.sources.misc
  783. X * 
  784. X */
  785. X
  786. X#define OVERLAY1
  787. X
  788. X#include "glib.h"
  789. X#include <ctype.h>
  790. X
  791. Xchar *visnum(), *visonoff(), *vism3num(), *viswave(), *vismono();
  792. Xchar *visfreq(), *visdx1a();
  793. X
  794. X#define RESERVESIZE 0
  795. X
  796. X/* This array contains arbitrary screen labels */
  797. Xstruct labelinfo Ldx100[] = {
  798. X#MENU
  799. X
  800. X                                                 Algorithm   %
  801. X                                                 =========
  802. X
  803. X           Dcy Lev Dcy              De  Out     Amp Eg  Key Key
  804. X OP    Atk  1   1   2  Rls   Freq   tun Lvl Vel Mod Bia Rat Scl
  805. X --    --- --- --- --- ---   ----   --- --- --- --- --- --- ---
  806. X 1      %   %   %   %   %    %       %   %   %  %    %   %   %
  807. X 2      %   %   %   %   %    %       %   %   %  %    %   %   %
  808. X 3      %   %   %   %   %    %       %   %   %  %    %   %   %
  809. X 4      %   %   %   %   %    %       %   %   %  %    %   %   %
  810. X
  811. X                                 Feedback    %         Mono/Poly          %
  812. X-------------------------+       Transpose   %         Amp Mod Depth      %
  813. XN = set name  q = quit   |       LFO Speed   %         Amp Mod Sense      %
  814. Xh = left      l = right  |       LFO Delay   %         Pitch Mod Depth    %
  815. Xk = up        j = down   |       LFO Wave    %         Pitch Mod Sense    %
  816. XK = incr      J = decr   |       LFO Sync    %         Mod Pitch Range    %
  817. Xspace = play auto-note   |       Pitch Bend  %         Mod Amp Range      %
  818. X                         |       Port. Time  %         Breath Pitch       %
  819. XAuto-Note:               |       Port. Mode  %         Breath Amp         %
  820. X   Pitch %    Vol  %     |       Port. Foot  %         Breath Pitch Bias  %
  821. X   Dur   %    Chan %     |       Sus. Foot   %         Breath EG Bias     %
  822. X                         |
  823. X#END
  824. X-1,-1,NULL
  825. X};
  826. X
  827. Xstruct paraminfo  Pdx100[] =  {
  828. X/*
  829. XNAME        TYPE    POS    MAX    OFFSET    MASK    SHIFT    ADHOC
  830. X */
  831. X#O algorithm    dx1a    %%    7    0
  832. X#O op1attack    num    %%    31    0
  833. X#O op1decay1    num    %%    31    0
  834. X#O op1level1    num    %%    15    0
  835. X#O op1decay2    num    %%    31    0
  836. X#O op1release    num    %%    31    0
  837. X#O op1freq    freq    %%    63    0
  838. X#O op1detune    m3num    %%    6    0
  839. X#O op1outlevel    num    %%    99    0
  840. X#O op1velocity    num    %%    7    0
  841. X#O op1ampmod    onoff    %%    1    0
  842. X#O op1egbias    num    %%    7    0
  843. X#O op1keyrate    num    %%    3    0
  844. X#O op1keyscale    num    %%    99    0
  845. X#O op2attack    num    %%    31    0
  846. X#O op2decay1    num    %%    31    0
  847. X#O op2level1    num    %%    15    0
  848. X#O op2decay2    num    %%    31    0
  849. X#O op2release    num    %%    31    0
  850. X#O op2freq    freq    %%    63    0
  851. X#O op2detune    m3num    %%    6    0
  852. X#O op2outlevel    num    %%    99    0
  853. X#O op2velocity    num    %%    7    0
  854. X#O op2ampmod    onoff    %%    1    0
  855. X#O op2egbias    num    %%    7    0
  856. X#O op2keyrate    num    %%    3    0
  857. X#O op2keyscale    num    %%    99    0
  858. X#O op3attack    num    %%    31    0
  859. X#O op3decay1    num    %%    31    0
  860. X#O op3level1    num    %%    15    0
  861. X#O op3decay2    num    %%    31    0
  862. X#O op3release    num    %%    31    0
  863. X#O op3freq    freq    %%    63    0
  864. X#O op3detune    m3num    %%    6    0
  865. X#O op3outlevel    num    %%    99    0
  866. X#O op3velocity    num    %%    7    0
  867. X#O op3ampmod    onoff    %%    1    0
  868. X#O op3egbias    num    %%    7    0
  869. X#O op3keyrate    num    %%    3    0
  870. X#O op3keyscale    num    %%    99    0
  871. X#O op4attack    num    %%    31    0
  872. X#O op4decay1    num    %%    31    0
  873. X#O op4level1    num    %%    15    0
  874. X#O op4decay2    num    %%    31    0
  875. X#O op4release    num    %%    31    0
  876. X#O op4freq    freq    %%    63    0
  877. X#O op4detune    m3num    %%    6    0
  878. X#O op4outlevel    num    %%    99    0
  879. X#O op4velocity    num    %%    7    0
  880. X#O op4ampmod    onoff    %%    1    0
  881. X#O op4egbias    num    %%    7    0
  882. X#O op4keyrate    num    %%    3    0
  883. X#O op4keyscale    num    %%    99    0
  884. X#O feedback    num    %%    7    0
  885. X#O playmode    mono    %%    1    0
  886. X#O transpose    num    %%    45    0
  887. X#O amoddepth    num    %%    99    0
  888. X#O lfospeed    num    %%    99    0
  889. X#O amodsens    num    %%    3    0
  890. X#O lfodelay    num    %%    99    0
  891. X#O pmoddepth    num    %%    99    0
  892. X#O lfowave    wave    %%    3    0
  893. X#O pmodsens    num    %%    7    0
  894. X#O lfosync    onoff    %%    1    0
  895. X#O modprange    num    %%    99    0
  896. X#O pitchbend    num    %%    12    0
  897. X#O modarange    num    %%    99    0
  898. X#O portatime    num    %%    99    0
  899. X#O breathprange    num    %%    99    0
  900. X#O portmode    num    %%    1    0
  901. X#O breatharange    num    %%    99    0
  902. X#O autovol    num    %%    127    -63
  903. X#O autopitch    num    %%    127    -60
  904. X#O portfoot    onoff    %%    1    0
  905. X#O breathpbias    num    %%    99    0
  906. X#O autochan    num    %%    16    -1    *5
  907. X#O autodur    num    %%    20    -5    *5
  908. X#O susfoot    onoff    %%    1    0
  909. X#O breathegbias    num    %%    99    0
  910. XNULL,NULL,-1,-1,-1,-1,visnum,0,0,0,0
  911. X};
  912. X
  913. END_OF_FILE
  914. if test 4111 -ne `wc -c <'dx100.mnu'`; then
  915.     echo shar: \"'dx100.mnu'\" unpacked with wrong size!
  916. fi
  917. # end of 'dx100.mnu'
  918. fi
  919. if test -f 'glib.h' -a "${1}" != "-c" ; then 
  920.   echo shar: Will not clobber existing file \"'glib.h'\"
  921. else
  922. echo shar: Extracting \"'glib.h'\" \(3792 characters\)
  923. sed "s/^X//" >'glib.h' <<'END_OF_FILE'
  924. X/* $Id: glib.h,v 1.6 89/05/06 17:13:25 lee Exp $
  925. X *
  926. X * GLIB - a Generic LIBrarian and editor for synths
  927. X * Tim Thompson
  928. X * modifications: Kesti, Lee
  929. X * $Log:    glib.h,v $
  930. X * Revision 1.6  89/05/06  17:13:25  lee
  931. X * rel. to comp.sources.misc
  932. X * 
  933. X */
  934. X
  935. X#include <stdio.h>
  936. X#include "machdep.h"
  937. X
  938. X#define EOX 0xf7
  939. X#define MOUSE -2
  940. X
  941. X#ifndef BUFSIZ
  942. X#define BUFSIZ 512
  943. X#endif
  944. X
  945. X/* If a machine needs to do something special to read/write a binary file, */
  946. X/* this is a hook that a machdep.h can override to do what it  needs to. */
  947. X/* For example, see the Atari ST version  of machdep.h */
  948. X#ifndef OPENBINFILE
  949. X#define OPENBINFILE(f,file,mode) f=fopen(file,mode)
  950. X#endif
  951. X
  952. X
  953. X#ifndef OPENTEXTFILE
  954. X#define OPENTEXTFILE(f,name,mode) f=fopen(name,mode)
  955. X#endif
  956. X
  957. X/* Seconds before we give up trying to read something */
  958. X#define TIMEOUT 5
  959. X
  960. X#define NUMONSCREEN 12
  961. X/* position of first voice row */
  962. X#define FIRSTROW 10
  963. X#define LEFTSIDE 2
  964. X#define RIGHTSIDE 55
  965. X#define YANKROW 12
  966. X#define YANKCOL 31
  967. X#define LIBBANKS 3
  968. X#define NOREDRAW 0
  969. X#define REDRAW 1
  970. X
  971. X#define ctl(x) (x&037)
  972. X
  973. X#define CH_REDRAW '\014'
  974. X
  975. X#define CH_INC 'K'
  976. X#define CH_INC2 'I'
  977. X#define CH_INC3 '>'
  978. X#define CH_DEC 'J'
  979. X#define CH_DEC2 'M'
  980. X#define CH_DEC3 '<'
  981. X#define CH_SAME 'S'
  982. X
  983. X#define CH_LEFT 'h'
  984. X#define CH_DOWN 'j'
  985. X#define CH_UP 'k'
  986. X#define CH_RIGHT 'l'
  987. X/* for arrow key support to work, next 4 defines
  988. X * can't be changed (unless code in unix-mach.c is modified)
  989. X */
  990. X#define ALTCH_LEFT ctl('b')
  991. X#define ALTCH_DOWN ctl('n')
  992. X#define ALTCH_UP ctl('p')
  993. X#define ALTCH_RIGHT ctl('f')
  994. X
  995. X#define SCR_DOWN '\04'
  996. X#define SCR_UP '\025'
  997. X
  998. X#define STR_LEFT "h"
  999. X#define STR_DOWN "j"
  1000. X#define STR_UP "k"
  1001. X#define STR_RIGHT "l"
  1002. X
  1003. X#define VOICEBYTE(d,v,n) (*((d)+(v)*Voicesize+(n)))
  1004. X
  1005. Xstruct paraminfo {
  1006. X    char *p_name;
  1007. X    char *p_label;
  1008. X    INT16 p_lrow;    /* position for printing name */
  1009. X    INT16 p_lcol;
  1010. X    INT16 p_vrow;        /* position for printing value */
  1011. X    INT16 p_vcol;
  1012. X    char *((*p_tovis)());
  1013. X    INT16 p_min;
  1014. X    INT16 p_max;
  1015. X    INT16 p_val;
  1016. X    INT16 p_flags;
  1017. X};
  1018. X
  1019. Xstruct labelinfo {
  1020. X    INT16 l_row;
  1021. X    INT16 l_col;
  1022. X    char *l_text;
  1023. X};
  1024. X
  1025. Xstruct editinfo {
  1026. X    char *ed_name;        /* Synth name */
  1027. X    struct paraminfo *ed_params;    /* list of parameters */
  1028. X    struct labelinfo *ed_labels;    /* screen labels in edit mode */
  1029. X    INT16 ed_nvoices;        /* number of voices */
  1030. X    INT16 ed_vsize;        /* size of each voice data, in bytes */
  1031. X    INT16 ed_nsize;        /* name size */
  1032. X    int ed_dataid;        /* data ID */
  1033. X    int (*ed_din)();    /* copy voice data into paraminfo array */
  1034. X    int (*ed_dout)();    /* copy voice data out of paraminfo array */
  1035. X    int (*ed_sedit)();    /* send 1 voice to synth edit buffer */
  1036. X    int (*ed_sone)();    /* send 1 voice to a synth (permanent) patch*/
  1037. X    int (*ed_sbulk)();    /* send bulk voice data */
  1038. X    int (*ed_gbulk)();    /* get bulk voice data */
  1039. X    char *(*ed_nof)();    /* get name of a voice out of data */
  1040. X    int (*ed_snof)();    /* set name of a voice in data */
  1041. X    char *(*ed_numof)();    /* convert voice number to on-screen text */
  1042. X    int (*ed_cvtnum)();    /* convert visable voice number to std. format */
  1043. X    int (*ed_cvtanum)();    /* convert alphanumeric voice number to std. format */
  1044. X};
  1045. X
  1046. Xstruct peredinfo {
  1047. X    char *ed_libdata;    /* memory for library banks */
  1048. X    char *ed_syndata;    /* memory for synth bank */
  1049. X    char *ed_yankdata;    /* memory for yank buffer */
  1050. X    INT16 ed_libindex;    /* voice number of topmost displayed lib voice*/
  1051. X    INT16 ed_synindex;    /* ditto for synth side */
  1052. X    INT16 ed_channel;        /* MIDI channel # */
  1053. X    INT16 ed_erow;
  1054. X    INT16 ed_ecol;
  1055. X};
  1056. X
  1057. Xextern struct paraminfo *P;
  1058. Xextern struct labelinfo *L;
  1059. Xextern struct editinfo E[];
  1060. Xextern int Rows, Cols, Channel, Nvoices, Voicesize, Redraw, DataID;
  1061. Xextern char *Reason, *Synthname;
  1062. X
  1063. Xchar *bankvoice();
  1064. Xvoid setval();
  1065. Xint getval();
  1066. Xchar *malloc(), *alloc(), *nextls();
  1067. XFILE *fopen();
  1068. Xchar *strcat(), *strcpy();
  1069. Xlong milliclock();
  1070. X
  1071. Xextern int synthinfileflag;
  1072. Xextern int synthoutfileflag;
  1073. END_OF_FILE
  1074. if test 3792 -ne `wc -c <'glib.h'`; then
  1075.     echo shar: \"'glib.h'\" unpacked with wrong size!
  1076. fi
  1077. # end of 'glib.h'
  1078. fi
  1079. if test -f 'k1vis.h' -a "${1}" != "-c" ; then 
  1080.   echo shar: Will not clobber existing file \"'k1vis.h'\"
  1081. else
  1082. echo shar: Extracting \"'k1vis.h'\" \(511 characters\)
  1083. sed "s/^X//" >'k1vis.h' <<'END_OF_FILE'
  1084. Xchar *visnum();
  1085. Xchar *vispnum();
  1086. Xchar *vispan();
  1087. Xchar *vispoly();
  1088. Xchar *visvelosw();
  1089. Xchar *vismode();
  1090. Xchar *vistwofour();
  1091. Xchar *vismute();
  1092. Xchar *vispolym();
  1093. Xchar *visvbwh();
  1094. Xchar *viscrv();
  1095. Xchar *viskeyshift();
  1096. Xchar *visfinetune();
  1097. Xchar *viscpitch();
  1098. Xchar *vislpitch();
  1099. Xchar *visonoff();
  1100. Xchar *visonoffk1();
  1101. Xchar *visonoffk2();
  1102. Xchar *visonoffk3();
  1103. Xchar *visonoffk4();
  1104. Xchar *viscsfnk1();
  1105. Xchar *viscsfnk2();
  1106. Xchar *viscsfnk3();
  1107. Xchar *viscsfnk4();
  1108. Xchar *visam1();
  1109. Xchar *visam3();
  1110. Xchar *visifosh();
  1111. Xchar *viswave();
  1112. END_OF_FILE
  1113. if test 511 -ne `wc -c <'k1vis.h'`; then
  1114.     echo shar: \"'k1vis.h'\" unpacked with wrong size!
  1115. fi
  1116. # end of 'k1vis.h'
  1117. fi
  1118. if test -f 'k5multi.mnu' -a "${1}" != "-c" ; then 
  1119.   echo shar: Will not clobber existing file \"'k5multi.mnu'\"
  1120. else
  1121. echo shar: Extracting \"'k5multi.mnu'\" \(1511 characters\)
  1122. sed "s/^X//" >'k5multi.mnu' <<'END_OF_FILE'
  1123. X/* $Id: k5multi.mnu,v 1.6 89/05/06 17:13:29 lee Exp $
  1124. X * GLIB - a Generic LIBrarian and editor for synths
  1125. X *
  1126. X * Kawai K-5 Librarian - handles (SINGLE and) MULTI patches.
  1127. X * Functions are annotated if they work for SINGLE, MULTI, or both kinds.
  1128. X * Full editing not implemented - there are zillions of parameters,
  1129. X * and the huge LCD on the K-5 is actually quite easy to read and use.
  1130. X *
  1131. X * Alan Bland - att!druwy!mab
  1132. X * $Log:    k5multi.mnu,v $
  1133. X * Revision 1.6  89/05/06  17:13:29  lee
  1134. X * rel. to comp.sources.misc
  1135. X * 
  1136. X */
  1137. X
  1138. X#define OVERLAY2
  1139. X
  1140. X#include "glib.h"
  1141. X
  1142. X#define K5SINGLE    0
  1143. X#define K5MULTI        1
  1144. X#define K5MAGIC        0x5a3c
  1145. X
  1146. X#define NERRS        5
  1147. X#define RESERVESIZE    0
  1148. X
  1149. Xextern char *visnum();
  1150. X
  1151. X
  1152. X/* This array contains arbitrary screen labels (MULTI) */
  1153. Xstruct labelinfo Lk5m[] = {
  1154. X#MENU
  1155. X
  1156. X
  1157. X
  1158. X          Sorry, no edit capability implemented for the K-5 yet.
  1159. X
  1160. X
  1161. X
  1162. X
  1163. X
  1164. X
  1165. X
  1166. X
  1167. X
  1168. X
  1169. X
  1170. X  +-------------------------+--------------+
  1171. X  |Space = Play Note        | Auto-Note    |
  1172. X  |                         |              |
  1173. X  |h = left   q = quit      |Pitch    %    |
  1174. X  |j = down   N = Set Name  |Volume   %    |
  1175. X  |k = up     J = Decrement |Duration %    |
  1176. X  |l = right  K = Increment |Channel  %    |
  1177. X  |                         |              |
  1178. X  +-------------------------+--------------+
  1179. X#END
  1180. X-1,-1,NULL
  1181. X};
  1182. X
  1183. Xstruct paraminfo  Pk5m[] =  {
  1184. X/*
  1185. XNAME        TYPE    POS    MAX    OFFSET    MASK    SHIFT    ADHOC
  1186. X */
  1187. X#O autopitch    num    %%    127    -60
  1188. X#O autovol    num    %%    127    -63
  1189. X#O autodur    num    %%    20    -5    *5
  1190. X#O autochan    num    %%    16    -1    *5
  1191. XNULL,NULL,-1,-1,-1,-1,visnum,0,0,0,0
  1192. X};
  1193. X
  1194. END_OF_FILE
  1195. if test 1511 -ne `wc -c <'k5multi.mnu'`; then
  1196.     echo shar: \"'k5multi.mnu'\" unpacked with wrong size!
  1197. fi
  1198. # end of 'k5multi.mnu'
  1199. fi
  1200. if test -f 'mac-glib.r' -a "${1}" != "-c" ; then 
  1201.   echo shar: Will not clobber existing file \"'mac-glib.r'\"
  1202. else
  1203. echo shar: Extracting \"'mac-glib.r'\" \(4012 characters\)
  1204. sed "s/^X//" >'mac-glib.r' <<'END_OF_FILE'
  1205. X/* $Id: mac-glib.r,v 1.6 89/05/06 17:13:31 lee Exp $
  1206. X * glib.r - glib resources
  1207. X *
  1208. X * SAF 3/7/88 (Steven Falco)
  1209. X * $Log:    mac-glib.r,v $
  1210. X * Revision 1.6  89/05/06  17:13:31  lee
  1211. X * rel. to comp.sources.misc
  1212. X * 
  1213. X */
  1214. X
  1215. X#include "Types.r"
  1216. X
  1217. X/* These define's are used in the MENU resources to disable specific
  1218. X   menu items. */
  1219. X#define AllItems    0b1111111111111111111111111111111    /* 31 flags */
  1220. X#define MenuItem1    0b00001
  1221. X#define MenuItem2    0b00010
  1222. X#define MenuItem3    0b00100
  1223. X#define MenuItem4    0b01000
  1224. X#define MenuItem5    0b10000
  1225. X
  1226. Xtype 'GLIB' as 'STR ';
  1227. X
  1228. Xresource 'GLIB' (0) {
  1229. X    "GLib Version 1.0";
  1230. X};
  1231. X
  1232. Xresource 'BNDL' (128) {
  1233. X    'GLIB',                /* our signature */
  1234. X    0,
  1235. X    {
  1236. X        'ICN#',
  1237. X        {
  1238. X            0, 128;        /* glib's icon */
  1239. X            1, 129        /* dumps' icon */
  1240. X        };
  1241. X        'FREF',
  1242. X        {
  1243. X            0, 128;        /* glib's type */
  1244. X            1, 129        /* dumps' type */
  1245. X        }
  1246. X    }
  1247. X};
  1248. X
  1249. Xresource 'ICN#' (128) {
  1250. X    {    /* array: 2 elements */
  1251. X        /* [1] */
  1252. X        $"0000 0000 0000 0000 0000 0000 003F 8000"
  1253. X        $"007F C000 00E0 E000 0180 3000 0180 1800"
  1254. X        $"0398 CC00 0700 0E00 0707 0E00 0710 4E00"
  1255. X        $"0388 8C00 11C7 1800 18F0 3000 1C3F E000"
  1256. X        $"0E0F C000 0706 0000 03FF FF00 01FF FF80"
  1257. X        $"0006 0180 0006 0180 0006 0000 001F F000"
  1258. X        $"003F F800 0070 1C00 00E0 0C00 00C0 0C00"
  1259. X        $"00C0 0C00 00F0 0F00 00F0 0F00 0000 0000",
  1260. X        /* [2] */
  1261. X        $"0000 0000 007F C000 00FF E000 01FF F000"
  1262. X        $"03FF F800 07FF FC00 0FFF FE00 1FFF FF00"
  1263. X        $"3FFF FF80 7FFF FF80 7FFF FF80 7FFF FF80"
  1264. X        $"7FFF FF80 7FFF FF80 7FFF FF80 7FFF FFC0"
  1265. X        $"7FFF FFE0 7FFF FFE0 3FFF FFE0 1FFF FFE0"
  1266. X        $"0FFF FFE0 07FF FFE0 03FF FFE0 03FF FFE0"
  1267. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1268. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1269. X    }
  1270. X};
  1271. X
  1272. Xresource 'ICN#' (129) {
  1273. X    {    /* array: 2 elements */
  1274. X        /* [1] */
  1275. X        $"0000 0000 0000 0000 0000 0000 0000 0000"
  1276. X        $"0000 0000 0003 F000 0043 FFC0 0063 0FC0"
  1277. X        $"01F3 0000 01FB 0000 01F3 F000 0063 FFC0"
  1278. X        $"0043 0FC0 0003 0000 0003 0000 0003 0000"
  1279. X        $"0003 0400 0003 0C00 007B 1FC0 00FF 3FC0"
  1280. X        $"01FF 1FC0 01FF 0C00 01FF 0400 00FE 0000"
  1281. X        $"007C 0000 0000 0000 0000 0000 0000 0000"
  1282. X        $"0000 0000 0000 0000 0000 0000 0000 0000",
  1283. X        /* [2] */
  1284. X        $"0000 0000 0000 0000 0000 0000 0000 0000"
  1285. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1286. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1287. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1288. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1289. X        $"03FF FFE0 03FF FFE0 03FF FFE0 03FF FFE0"
  1290. X        $"03FF FFE0 03FF FFE0 0000 0000 0000 0000"
  1291. X        $"0000 0000 0000 0000 0000 0000 0000 0000"
  1292. X    }
  1293. X};
  1294. X
  1295. Xresource 'FREF' (128) {
  1296. X    'APPL', 0, ""
  1297. X};
  1298. X
  1299. Xresource 'FREF' (129) {
  1300. X    'TEXT', 1, ""
  1301. X};
  1302. X
  1303. Xresource 'DLOG' (128, "About GLibI") {
  1304. X    {66, 102, 224, 400},
  1305. X    dBoxProc, visible, noGoAway, 0x0, 128, ""
  1306. X};
  1307. X
  1308. Xresource 'DITL' (128) {
  1309. X     {
  1310. X/* 1 */ {130, 205, 150, 284},
  1311. X        button {
  1312. X            enabled,
  1313. X            "Continue"
  1314. X        };
  1315. X/* 2 */ {94, 28, 115, 301},                /* memory amount */
  1316. X        staticText {
  1317. X            disabled,
  1318. X            ""
  1319. X        };
  1320. X/* 3 */ {8, 14, 27, 169},
  1321. X        staticText {
  1322. X            disabled,
  1323. X            "GLib Version 1.0"
  1324. X        };
  1325. X/* 4 */ {32, 29, 50, 195},
  1326. X        staticText {
  1327. X            disabled,
  1328. X            "Author: Tim Thompson"
  1329. X        };
  1330. X/* 5 */ {55, 28, 73, 299},
  1331. X        staticText {
  1332. X            disabled, "Macintosh conversion: Steven A. Falco"
  1333. X        }
  1334. X    }
  1335. X};
  1336. X
  1337. Xresource 'MENU' (128, "Apple", preload) {
  1338. X    128, textMenuProc,
  1339. X    AllItems & ~MenuItem2,    /* Disable item #2 */
  1340. X    enabled, apple,
  1341. X    {
  1342. X        "About GLibI",
  1343. X            noicon, nokey, nomark, plain;
  1344. X        "-",
  1345. X            noicon, nokey, nomark, plain
  1346. X    }
  1347. X};
  1348. X
  1349. Xresource 'MENU' (129, "File", preload) {
  1350. X    129, textMenuProc,
  1351. X    allEnabled,
  1352. X    enabled, "File",
  1353. X    {
  1354. X        "Quit",
  1355. X            noicon, "Q", nomark, plain
  1356. X    }
  1357. X};
  1358. X
  1359. Xresource 'MENU' (130, "Edit", preload) {
  1360. X    130, textMenuProc,
  1361. X    allEnabled,
  1362. X    enabled, "Edit",
  1363. X     {
  1364. X        "Undo",
  1365. X            noicon, "Z", nomark, plain;
  1366. X        "-",
  1367. X            noicon, nokey, nomark, plain;
  1368. X        "Cut",
  1369. X            noicon, "X", nomark, plain;
  1370. X        "Copy",
  1371. X            noicon, "C", nomark, plain;
  1372. X        "Paste",
  1373. X            noicon, "V", nomark, plain;
  1374. X        "Clear",
  1375. X            noicon, nokey, nomark, plain
  1376. X    }
  1377. X};
  1378. X
  1379. Xresource 'SIZE' (-1) {
  1380. X    dontSaveScreen,
  1381. X    ignoreSuspendResumeEvents,
  1382. X    enableOptionSwitch,
  1383. X    canBackground,                /* sort-of :-) */
  1384. X    notMultiFinderAware,
  1385. X    300032,                        /* preferred size */
  1386. X    300032                        /* minimum size */
  1387. X};
  1388. END_OF_FILE
  1389. if test 4012 -ne `wc -c <'mac-glib.r'`; then
  1390.     echo shar: \"'mac-glib.r'\" unpacked with wrong size!
  1391. fi
  1392. # end of 'mac-glib.r'
  1393. fi
  1394. if test -f 'mac-mach.h' -a "${1}" != "-c" ; then 
  1395.   echo shar: Will not clobber existing file \"'mac-mach.h'\"
  1396. else
  1397. echo shar: Extracting \"'mac-mach.h'\" \(1520 characters\)
  1398. sed "s/^X//" >'mac-mach.h' <<'END_OF_FILE'
  1399. X/* $Id: mac-mach.h,v 1.6 89/05/06 17:13:32 lee Exp $
  1400. X * GLIB - a Generic LIBrarian and editor for synths
  1401. X *
  1402. X * Machine dependent stuff.
  1403. X *
  1404. X * Macintosh version
  1405. X * Steven Falco
  1406. X * $Log:    mac-mach.h,v $
  1407. X * Revision 1.6  89/05/06  17:13:32  lee
  1408. X * rel. to comp.sources.misc
  1409. X * 
  1410. X */
  1411. X
  1412. X#define macintosh
  1413. X/*
  1414. X * You must also chose a development system.
  1415. X * Currently, only MPW is supported.  See machdep.c and vt.c for more
  1416. X * information.  Note that INT16 must be defined as a 16-bit (or larger)
  1417. X * integer.  In MPW (my development system), a short is 16 bits.
  1418. X *
  1419. X * Steve Falco, moss!saf
  1420. X */
  1421. X#define MPW   
  1422. X/* any others? */
  1423. X
  1424. X/* overlay directives for compiler */
  1425. X#ifdef OVERLAY1
  1426. X#define __SEG__ over1
  1427. X#endif
  1428. X#ifdef OVERLAY2
  1429. X#define __SEG__ over2
  1430. X#endif
  1431. X
  1432. X#include <errors.h>
  1433. X#include <files.h>
  1434. X#include <types.h>
  1435. X#include <segload.h>
  1436. X#include <strings.h>
  1437. X#include <vt.h>
  1438. X#include <mdr.h>
  1439. X
  1440. X#define SIGNATURE 'GLIB'
  1441. X#define FSFCBLen  0x3f6
  1442. X
  1443. X#define INT16 short
  1444. X
  1445. XOSErr GetFinfo(), SetFinfo();
  1446. X
  1447. X/*
  1448. X * MPW doesn't set the file type.  This tends to be important so we
  1449. X * do it manually...
  1450. X */
  1451. X#define SET_TEXT(filename)                 \
  1452. X{                            \
  1453. X    FInfo myfinfo;                    \
  1454. X    switch(GetFInfo(filename, 0, &myfinfo)) {    \
  1455. X        case noErr:                \
  1456. X            myfinfo.fdType = 'TEXT';    \
  1457. X            myfinfo.fdCreator = SIGNATURE;    \
  1458. X            SetFInfo(filename, 0, &myfinfo);\
  1459. X            break;                \
  1460. X        default:                \
  1461. X            fprintf(stderr,"Cannot set file type for %s\n", filename); \
  1462. X            break;                \
  1463. X    }                        \
  1464. X}
  1465. X
  1466. X#define STATMIDI (midi_rxst==MIDI_NE?1:0)
  1467. X
  1468. X#define STATTXBF (midi_txst==MIDI_NE?1:0)
  1469. END_OF_FILE
  1470. if test 1520 -ne `wc -c <'mac-mach.h'`; then
  1471.     echo shar: \"'mac-mach.h'\" unpacked with wrong size!
  1472. fi
  1473. # end of 'mac-mach.h'
  1474. fi
  1475. if test -f 'mac-make.uu' -a "${1}" != "-c" ; then 
  1476.   echo shar: Will not clobber existing file \"'mac-make.uu'\"
  1477. else
  1478. echo shar: Extracting \"'mac-make.uu'\" \(1659 characters\)
  1479. sed "s/^X//" >'mac-make.uu' <<'END_OF_FILE'
  1480. Xbegin 644 mac-make
  1481. XM(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
  1482. XM(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(PTC(%=!4DY)3D<@+2!42$E3($9)
  1483. XM3$4@0T].5$%)3E,@4U!%0TE!3"!#2$%204-415)3($]55%-)1$4@5$A%($Y/
  1484. XM4DU!3" C#2,@05-#24D@4D%.1T4N("!$3TXG5"!%1$E4($E4($580T505"!/
  1485. XM3B!!($U!0TE.5$]32"$A(2$@(" @(" @(" @(" @(",-(R,C(R,C(R,C(R,C
  1486. XM(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
  1487. XM(R,C(R,C(R,C(R,C(PTC#2,@;F]T92 M('1H:7,@:7,@<')E='1Y(&1I9F9E
  1488. XM<F5N="!F<F]M('1H92!5;FEX(&UA:V5F:6QE+B @5&AE(&UA8R!C86XG= TC
  1489. XM(&AA;F1L92!T:&4@+F,O+F\@97%U871E<RX@($%L<V\L('!A=&@@;F%M97,@
  1490. XM:&%V92!A(&1I9F9E<F5N="!S>6YT87@L#2,@;&EB<F%R:65S(&%R92!I;B!A
  1491. XM(&1I9F9E<F5N="!P;&%C92P@86YD('-P96-I86P@8VAA<F%C=&5R<R!A<F4@
  1492. XM=7-E9"X-(R!F:6YA;&QY+"!T:&4@8V]M<&EL97(@:&%N9&QE<R Q(&9I;&4@
  1493. XM870@82!T:6UE(&%N9"!D;V5S;B=T(&%U=&]M871I8V%L;'D-(R!L:6YK(2 @
  1494. XM3V@@=V5L;"X@270@9&]E<R!W;W)K('1H;W5G:"XN+@TC#2,@4T%&(#<O,C8O
  1495. XM.#<-(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C
  1496. XM(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(R,C(PU,24)3(#T@>V-L:6)R87)I
  1497. XM97-]8W)U;G1I;64N;R"V#0D@("![8VQI8G)A<FEE<WUS=&1C;&EB+F\@M@T)
  1498. XM(" @>V-L:6)R87)I97-]8VEN=&5R9F%C92YO(+8-"2 @('MC;&EB<F%R:65S
  1499. XM?6-S86YE;&EB+F\@M@T)(" @>V-L:6)R87)I97-];&EB8RYO#0U34D,@/2!D
  1500. XM=S@P,# N8R!G;&EB+F,@9VQI8BYH(&=L:6(N<B"V#0D);&ES="YC(&UA8RUM
  1501. XM86-H+F,@;6%C+6UA8V@N:""V#0D);6%C+6UA:V4@='@X,7 N8R!T>#@Q>BYC
  1502. XM('EA;6%?8V]M+F,-#0U/0DH@/2!G;&EB+F,N;R!L:7-T+F,N;R!D=S@P,# N
  1503. XM8RYO(+8-"0ET>#@Q<"YC+F\@='@X,7HN8RYO(+8-"0EY86UA7V-O;2YC+F\@
  1504. XM;6%C:&1E<"YC+F\-"0D-9VQI8B#$Q"!G;&EB+G(-"7)E>B!G;&EB+G(@+6\@
  1505. XM9VQI8@T)#6=L:6(@Q,0@>T]"2GT@9VQI8BYR('M,24)3?0T);&EN:R![3T)*
  1506. XM?2![3$E"4WT@+6\@9VQI8@T-9VQI8BYS:&%R(,0@>U-20WT-"7-H87(@>U-2
  1507. X.0WT@/B!G;&EB+G-H87)I
  1508. Xend
  1509. END_OF_FILE
  1510. if test 1659 -ne `wc -c <'mac-make.uu'`; then
  1511.     echo shar: \"'mac-make.uu'\" unpacked with wrong size!
  1512. fi
  1513. # end of 'mac-make.uu'
  1514. fi
  1515. if test -f 'mac-mdr.h' -a "${1}" != "-c" ; then 
  1516.   echo shar: Will not clobber existing file \"'mac-mdr.h'\"
  1517. else
  1518. echo shar: Extracting \"'mac-mdr.h'\" \(810 characters\)
  1519. sed "s/^X//" >'mac-mdr.h' <<'END_OF_FILE'
  1520. X/* $Id: mac-mdr.h,v 1.6 89/05/06 17:13:34 lee Exp $
  1521. X * mdr.h - header file for stuff that uses the midi driver
  1522. X *
  1523. X * Steven A. Falco  7/30/87
  1524. X * $Log:    mac-mdr.h,v $
  1525. X * Revision 1.6  89/05/06  17:13:34  lee
  1526. X * rel. to comp.sources.misc
  1527. X * 
  1528. X */
  1529. X
  1530. X#define MIDI_NE        0        /* queue has 1 or more bytes available */
  1531. X#define MIDI_EM        (-1)    /* queue is empty */
  1532. X
  1533. Xextern void midi_init();    /* set up hardware & software */
  1534. Xextern void midi_reset();    /* unset - very important to avoid crashes */
  1535. Xextern void midi_tx();        /* send a byte (but declare arg as a long) */
  1536. Xextern long midi_rx();        /* get a byte (returns -1 on "nothing available" */
  1537. Xextern char midi_txst;        /* transmit queue state (flags above) */
  1538. Xextern char midi_rxst;        /* receive queue state */
  1539. Xextern long midi_time;        /* relative time in mS (5 mS granularity) */
  1540. END_OF_FILE
  1541. if test 810 -ne `wc -c <'mac-mdr.h'`; then
  1542.     echo shar: \"'mac-mdr.h'\" unpacked with wrong size!
  1543. fi
  1544. # end of 'mac-mdr.h'
  1545. fi
  1546. if test -f 'mac-vt.h' -a "${1}" != "-c" ; then 
  1547.   echo shar: Will not clobber existing file \"'mac-vt.h'\"
  1548. else
  1549. echo shar: Extracting \"'mac-vt.h'\" \(2039 characters\)
  1550. sed "s/^X//" >'mac-vt.h' <<'END_OF_FILE'
  1551. X/* $Id: mac-vt.h,v 1.6 89/05/06 17:13:35 lee Exp $
  1552. X * vt.h - definitions for the vt100-like console device handler
  1553. X *
  1554. X * Steven A. Falco  4/30/87
  1555. X * $Log:    mac-vt.h,v $
  1556. X * Revision 1.6  89/05/06  17:13:35  lee
  1557. X * rel. to comp.sources.misc
  1558. X * 
  1559. X */
  1560. X
  1561. X#ifndef EOF
  1562. X#define EOF        -1
  1563. X#endif
  1564. X
  1565. X/* this structure defines one member of the _StdDevs array.  This is
  1566. X * similar to the Unix concept of bdevsw and cdevsw.
  1567. X */
  1568. Xtypedef struct {
  1569. X    int name;            /* 'CONS' for the console */
  1570. X    int (*l_access)();    /* NOT the same as open - can do mv or rm also */
  1571. X    int (*l_close)();    /* close */
  1572. X    int (*l_read)();    /* read */
  1573. X    int (*l_write)();    /* write */
  1574. X    int (*l_ioctl)();    /* ioctl */
  1575. X} DEVSW;
  1576. X
  1577. Xextern DEVSW _StdDevs[];
  1578. X
  1579. X/* this structure defines one member of the file table.  I believe
  1580. X * the table is dynamically allocated for 200 bytes at a time or
  1581. X * 10 entries.  But _lockedHandle may return words or something else.
  1582. X */
  1583. Xtypedef struct {
  1584. X    short flags;    /* high byte sometimes has fileno */
  1585. X    short errcode;    /* a MacOS error code */
  1586. X    DEVSW *handler;    /* a pointer to our _StdDevs array entry */
  1587. X    int z;            /* unknown */
  1588. X    int count;        /* read or write count desired. <-- --> */
  1589. X    char *buffer;    /* buffer pointer to use. <-- --> */
  1590. X} IOSTR;
  1591. X
  1592. X/* look up a file number in the file table and return a pointer to the
  1593. X * entry.  Pass in -1 to get a new entry.  NOTE - the ADDRESS of the
  1594. X * file number is passed - NOT the file number itself.  I wonder why?
  1595. X */
  1596. XIOSTR *_getIOPort();
  1597. X
  1598. X/* these are the low-level entry points to link the driver (handler)
  1599. X * into the system.  They require strange input arguments and always
  1600. X * return 0 on success.  Don't call them directly...
  1601. X */
  1602. Xextern    vt_faccess();
  1603. Xextern    vt_close();
  1604. Xextern    vt_read();
  1605. Xextern    vt_write();
  1606. Xextern    vt_ioctl();
  1607. X
  1608. X/* these are the ultra-low level calls that do all the work.  You can
  1609. X * call them directly to avoid all the IntEnv overhead.  See vt.c for
  1610. X * the input and output specifications.
  1611. X */
  1612. Xextern    vt_open();
  1613. Xextern    vt_getch();
  1614. Xextern    vt_peekch();
  1615. Xextern    vt_putch();
  1616. Xextern    vt_cooked();
  1617. Xextern    vt_raw();
  1618. END_OF_FILE
  1619. if test 2039 -ne `wc -c <'mac-vt.h'`; then
  1620.     echo shar: \"'mac-vt.h'\" unpacked with wrong size!
  1621. fi
  1622. # end of 'mac-vt.h'
  1623. fi
  1624. if test -f 'makevish.l' -a "${1}" != "-c" ; then 
  1625.   echo shar: Will not clobber existing file \"'makevish.l'\"
  1626. else
  1627. echo shar: Extracting \"'makevish.l'\" \(345 characters\)
  1628. sed "s/^X//" >'makevish.l' <<'END_OF_FILE'
  1629. X%{
  1630. X/* $Id: makevish.l,v 1.6 89/05/06 17:13:36 lee Exp $
  1631. X * Greg Lee
  1632. X * $Log:    makevish.l,v $
  1633. X * Revision 1.6  89/05/06  17:13:36  lee
  1634. X * rel. to comp.sources.misc
  1635. X * 
  1636. X */
  1637. X    int i;
  1638. X%}
  1639. X
  1640. X%%
  1641. X
  1642. X^"char *"[ \t\n]*"vis"[0-9A-Za-z_]+[ ]*"("  {
  1643. X    i = 6;
  1644. X    while (yytext[i++] != 's') ;
  1645. X    printf("char *vis%s);\n", yytext+i);
  1646. X};
  1647. X
  1648. X.    ;
  1649. X\n    ;
  1650. X
  1651. X%%
  1652. Xmain() { yylex(); }
  1653. END_OF_FILE
  1654. if test 345 -ne `wc -c <'makevish.l'`; then
  1655.     echo shar: \"'makevish.l'\" unpacked with wrong size!
  1656. fi
  1657. # end of 'makevish.l'
  1658. fi
  1659. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  1660.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  1661. else
  1662. echo shar: Extracting \"'patchlevel.h'\" \(21 characters\)
  1663. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  1664. X#define PATCHLEVEL 6
  1665. END_OF_FILE
  1666. if test 21 -ne `wc -c <'patchlevel.h'`; then
  1667.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  1668. fi
  1669. # end of 'patchlevel.h'
  1670. fi
  1671. if test -f 'pc-readme' -a "${1}" != "-c" ; then 
  1672.   echo shar: Will not clobber existing file \"'pc-readme'\"
  1673. else
  1674. echo shar: Extracting \"'pc-readme'\" \(225 characters\)
  1675. sed "s/^X//" >'pc-readme' <<'END_OF_FILE'
  1676. X
  1677. XThe DOS support for glib requires the Turbo C compiled and the
  1678. XMicrosoft Assembler (specifically, I have Turbo C 2.0 and MASM 4.0).
  1679. XCopy pc-mach.h to machdep.h, pc-mach.c to machdep.c, pc-tcc.mak to
  1680. Xmakefile, and type make.
  1681. END_OF_FILE
  1682. if test 225 -ne `wc -c <'pc-readme'`; then
  1683.     echo shar: \"'pc-readme'\" unpacked with wrong size!
  1684. fi
  1685. # end of 'pc-readme'
  1686. fi
  1687. if test -f 'pc-tcc.mak' -a "${1}" != "-c" ; then 
  1688.   echo shar: Will not clobber existing file \"'pc-tcc.mak'\"
  1689. else
  1690. echo shar: Extracting \"'pc-tcc.mak'\" \(2436 characters\)
  1691. sed "s/^X//" >'pc-tcc.mak' <<'END_OF_FILE'
  1692. X# $Id: pc-tcc.mak,v 1.6 89/05/06 17:13:41 lee Exp $
  1693. X#
  1694. X# Glib, Turbo C version for Kawai K1, etc.
  1695. X# Scott Snyder
  1696. X# $Log:    pc-tcc.mak,v $
  1697. X# Revision 1.6  89/05/06  17:13:41  lee
  1698. X# rel. to comp.sources.misc
  1699. X# 
  1700. X# added defs for CZ1
  1701. X# 
  1702. X# adapted from Tim Thompson's program
  1703. X# with modifications by Michael Kesti and Greg Lee
  1704. X
  1705. X# works with TC v2.0
  1706. X
  1707. XMODEL=l
  1708. X
  1709. XLEX = flex
  1710. XLEXLIB =
  1711. X# to use lex instead of flex:
  1712. X#LEX = lex
  1713. X#LEXLIB = -ll
  1714. X
  1715. X# defines for CFLAGS (below):
  1716. X#    BSD for fopen with mode 'r'/'w' instead of 'rb'/'wb'
  1717. X#    ULTRIX enables curses no()/nonl() fix
  1718. X#    ARROW for use of arrow keys (probably only bsd)
  1719. X# and uncomment one set of the following for supported synths:
  1720. X
  1721. X# Remove '#' from next 5 lines for Roland D-10:
  1722. X#SYNTHS = -DROLANDD10
  1723. X#SYNTHOBJ = vis.obj d10pat.obj d10tim.obj d10ton.obj d10wfg.obj d10tvf.obj \
  1724. X#       d10tva.obj d10rsu.obj d10urp.obj d10tra.obj
  1725. X#SYNTHC = d10pat.c d10tim.c d10wfg.c d10tvf.c d10tva.c \
  1726. X#    d10rsu.c d10urp.c d10tra.c # vis.h
  1727. X
  1728. X# Remove '#' from next 4 lines for various Yamaha, K5, etc.:
  1729. X#SYNTHS = -DTX81Z -DTX81ZPERF -DDX100 -DDW8000 -DKAWAIK5 -DDEP5
  1730. X#SYNTHOBJ = dx100.obj tx81z.obj tx81p.obj dw8000.obj yama_com.obj
  1731. X#       k5single.obj k5multi.obj dep5.obj
  1732. X#SYNTHC = dx100.c tx81z.c tx81p.c dw8000.c k5single.c k5multi.c dep5.c
  1733. X
  1734. X# Remove '#' from next group of lines for Yamaha DX7, DX7s:
  1735. XSYNTHS = -DDX7 -DDX7S
  1736. XSYNTHOBJ = dx7.obj dx7s.obj
  1737. XSYNTHC = dx7.c dx7s.c
  1738. X
  1739. X# Remove '#' from next 3 lines for Kawai K1:
  1740. X#SYNTHS = -DKAWAIK1
  1741. X#SYNTHOBJ = k1vis.o k1multi.o k1single.o
  1742. X#SYNTHC = k1multi.c k1single.c # k1vis.h
  1743. X
  1744. X# Remove '#' from next 3 lines for CZ1:
  1745. X#SYNTHS = -DCZ1
  1746. X#SYNTHOBJ = cz1.o
  1747. X#SYNTHC = cz1.c
  1748. X
  1749. X#
  1750. X# Define SSS to enable speed-up code in glib.c
  1751. X#
  1752. X
  1753. XCFLAGS = -N -m$(MODEL) -DSSS $(SYNTHS)
  1754. X
  1755. XGLIBOBJ = glib.obj machdep.obj list.obj pc-ints.obj
  1756. X
  1757. XOBJ = $(GLIBOBJ) $(SYNTHOBJ)
  1758. X
  1759. XH = glib.h machdep.h vis.h
  1760. X
  1761. X.mnu.c:
  1762. X    menutoc $*.mnu $*.c
  1763. X
  1764. X.c.obj:
  1765. X    tcc -c $(CFLAGS) $.
  1766. X
  1767. X.c.exe:
  1768. X    tcc -N $.
  1769. X
  1770. Xglib.exe : menutoc.exe $(SYNTHC) $(OBJ)
  1771. X    tcc -m$(MODEL) $(OBJ)
  1772. X
  1773. Xmachdep.c: pc-mach.c
  1774. X    copy pc-mach.c machdep.c
  1775. X
  1776. Xmachdep.h: pc-mach.h
  1777. X    copy pc-mach.h machdep.h
  1778. X
  1779. Xmachdep.obj: machdep.c $(H)
  1780. X
  1781. Xglib.obj: glib.c $(H)
  1782. X
  1783. Xlist.obj: list.c $(H)
  1784. X
  1785. Xdx100.obj: dx100.c $(H)
  1786. X
  1787. Xtx81z.obj: tx81z.c $(H)
  1788. X
  1789. Xtx81p.obj: tx81p.c $(H)
  1790. X
  1791. Xdw8000.obj: dw8000.c $(H)
  1792. X
  1793. Xyama_com.obj: yama_com.c $(H)
  1794. X
  1795. Xdx7.obj: dx7.c $(H)
  1796. X
  1797. Xdx7s.obj: dx7s.c $(H)
  1798. X
  1799. Xk5single.obj: k5single.c $(H)
  1800. X
  1801. Xk5multi.obj: k5multi.c $(H)
  1802. X
  1803. Xpc-ints.obj: pc-ints.asm
  1804. X    masm /mx pc-ints;
  1805. END_OF_FILE
  1806. if test 2436 -ne `wc -c <'pc-tcc.mak'`; then
  1807.     echo shar: \"'pc-tcc.mak'\" unpacked with wrong size!
  1808. fi
  1809. # end of 'pc-tcc.mak'
  1810. fi
  1811. if test -f 'st-mach.h' -a "${1}" != "-c" ; then 
  1812.   echo shar: Will not clobber existing file \"'st-mach.h'\"
  1813. else
  1814. echo shar: Extracting \"'st-mach.h'\" \(414 characters\)
  1815. sed "s/^X//" >'st-mach.h' <<'END_OF_FILE'
  1816. X/*
  1817. X * GLIB - a Generic LIBrarian and editor for synths
  1818. X *
  1819. X * Machine dependent stuff.
  1820. X *
  1821. X * Atari ST version
  1822. X */
  1823. X
  1824. X#define INT16 int
  1825. X
  1826. X#include <osbind.h>
  1827. X#include <gemdefs.h>
  1828. X#include <obdefs.h>
  1829. X
  1830. X#define CONSOLE 2
  1831. X#define MIDI 3
  1832. X
  1833. X#ifdef OVERLAY1
  1834. Xoverlay "over1"
  1835. X#endif
  1836. X
  1837. X#ifdef OVERLAY2
  1838. Xoverlay "over2"
  1839. X#endif
  1840. X
  1841. X#define OPENBINFILE(f,name,mode) f=fopen(name,mode[0]=='r'?"br":"bw")
  1842. X
  1843. X#define STATMIDI (Bconstat(MIDI))
  1844. END_OF_FILE
  1845. if test 414 -ne `wc -c <'st-mach.h'`; then
  1846.     echo shar: \"'st-mach.h'\" unpacked with wrong size!
  1847. fi
  1848. # end of 'st-mach.h'
  1849. fi
  1850. if test -f 'unix-mach.h' -a "${1}" != "-c" ; then 
  1851.   echo shar: Will not clobber existing file \"'unix-mach.h'\"
  1852. else
  1853. echo shar: Extracting \"'unix-mach.h'\" \(338 characters\)
  1854. sed "s/^X//" >'unix-mach.h' <<'END_OF_FILE'
  1855. X/* $Id: unix-mach.h,v 1.6 89/05/06 17:13:46 lee Exp $
  1856. X * GLIB - a Generic LIBrarian and editor for synths
  1857. X *
  1858. X * Machine dependent stuff.
  1859. X *
  1860. X * Unix version
  1861. X * Tim Thompson
  1862. X * $Log:    unix-mach.h,v $
  1863. X * Revision 1.6  89/05/06  17:13:46  lee
  1864. X * rel. to comp.sources.misc
  1865. X * 
  1866. X */
  1867. X
  1868. X#define INT16 int
  1869. X
  1870. X#define STATMIDI (statmidi())
  1871. X#define UNIX
  1872. END_OF_FILE
  1873. if test 338 -ne `wc -c <'unix-mach.h'`; then
  1874.     echo shar: \"'unix-mach.h'\" unpacked with wrong size!
  1875. fi
  1876. # end of 'unix-mach.h'
  1877. fi
  1878. if test -f 'vis.h' -a "${1}" != "-c" ; then 
  1879.   echo shar: Will not clobber existing file \"'vis.h'\"
  1880. else
  1881. echo shar: Extracting \"'vis.h'\" \(764 characters\)
  1882. sed "s/^X//" >'vis.h' <<'END_OF_FILE'
  1883. X/* $Id: vis.h,v 1.6 89/05/06 17:13:47 lee Exp $
  1884. X * Revision 1.5  89/04/25  15:54:39  Michael_Kesti
  1885. X * $Log:    vis.h,v $
  1886. X * Revision 1.6  89/05/06  17:13:47  lee
  1887. X * rel. to comp.sources.misc
  1888. X * 
  1889. X */
  1890. Xchar *vispan();
  1891. Xchar *visreverbtype();
  1892. Xchar *visreverbtime();
  1893. Xchar *visreverblevel();
  1894. Xchar *vispatchlevel();
  1895. Xchar *viskeymode();
  1896. Xchar *vissplit();
  1897. Xchar *vistonegroup();
  1898. Xchar *visrtone();
  1899. Xchar *vistonenum();
  1900. Xchar *viskeyshift();
  1901. Xchar *visfinetune();
  1902. Xchar *visbendrange();
  1903. Xchar *visassignmode();
  1904. Xchar *vistonebal();
  1905. Xchar *visstruct();
  1906. Xchar *vispmute();
  1907. Xchar *visenvmode();
  1908. Xchar *viscpitch();
  1909. Xchar *vispkeyfol();
  1910. Xchar *vistkeyfol();
  1911. Xchar *viswavebank();
  1912. Xchar *vispcmnum();
  1913. Xchar *visvelsens();
  1914. Xchar *visenvlev();
  1915. Xchar *visbiaslev();
  1916. Xchar *visbiaspd();
  1917. Xchar *vistvablev();
  1918. END_OF_FILE
  1919. if test 764 -ne `wc -c <'vis.h'`; then
  1920.     echo shar: \"'vis.h'\" unpacked with wrong size!
  1921. fi
  1922. # end of 'vis.h'
  1923. fi
  1924. echo shar: End of archive 1 \(of 15\).
  1925. cp /dev/null ark1isdone
  1926. MISSING=""
  1927. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ; do
  1928.     if test ! -f ark${I}isdone ; then
  1929.     MISSING="${MISSING} ${I}"
  1930.     fi
  1931. done
  1932. if test "${MISSING}" = "" ; then
  1933.     echo You have unpacked all 15 archives.
  1934.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  1935. else
  1936.     echo You still need to unpack the following archives:
  1937.     echo "        " ${MISSING}
  1938. fi
  1939. ##  End of shell archive.
  1940. exit 0
  1941.  
  1942.